package com.bawei.module_message;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.bawei.library_base.RouterPath;
import com.bawei.library_base.mvp.v.BaseFragment;

import io.rong.imkit.RongIM;
import io.rong.imkit.utils.RouteUtils;
import io.rong.imlib.RongIMClient;

@Route(path = RouterPath.Message.PAGER_MESSAGE)
public class MessageFragment extends BaseFragment {

    @Override
    public int beanLayout() {
        return R.layout.fragment_message;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {



            String token = "n0QngfhjjVzFnSxXW9V2S3+6jTViuCg0Q0UFYdGear0=@10fm.cn.rongnav.com;10fm.cn.rongcfg.com";
            RongIM.connect(token, new RongIMClient.ConnectCallback() {
                @Override
                public void onSuccess(String userId) {


                }

                @Override
                public void onError(RongIMClient.ConnectionErrorCode connectionErrorCode) {

                }

                @Override
                public void onDatabaseOpened(RongIMClient.DatabaseOpenStatus databaseOpenStatus) {

                }
            });
        RouteUtils.routeToConversationListActivity(getContext(), "title");
    }
}